<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('phpcms','header'); ?>
<div id="submenu"><?php echo tag('phpcms', 'tag_category_submenu', "", 0, 0, array (  'module' => 'phpcms',  'catid' => $catid,  'class' => 'url',  'target' => '_blank',));?></div>
<!--begin main-->
<div id="main">
  <!--begin left-->
  <div id="main_l" class="bdr_1">
      <!--位置导航-->
    <div id="position"><a href="">首页</a><?php echo catpos($catid);?></div>
    <!--图文混排一-->
<?php if(is_array($arrchildid)) foreach($arrchildid AS $cid => $c) { ?>
    <div class="cat">
      <div class="cat_title_1"><a href="<?php echo $c['url'];?>"><img src="images/more.gif" alt="更多" /></a>
        <h3><?php echo $c['catname'];?></h3>
      </div>
      <div class="cat_left">
  <?php echo tag('phpcms', 'tag_content_pic_one', "SELECT a.contentid,a.catid,a.typeid,a.areaid,a.title,a.style,a.thumb,a.keywords,a.description,a.userid,a.updatetime,a.inputtime,a.posids,a.url FROM `phpcms_content` a, `phpcms_content_position` p WHERE a.contentid=p.contentid AND p.posid=4 AND a.status=99   AND  `thumb`!='' ".get_sql_catid($c[catid])." ORDER BY a.contentid DESC", 0, 1, array (  'titlelen' => '96',  'target' => '_blank',  'width' => '198',  'height' => '130',));?>
      </div>
      <div class="cat_right">
        <ul class="pic_list">
        <?php echo tag('phpcms', 'tag_content_pic', "SELECT contentid,catid,typeid,areaid,title,style,thumb,keywords,description,userid,updatetime,inputtime,posids,url FROM `phpcms_content` WHERE  status=99   AND  `thumb`!='' ".get_sql_catid($c[catid])." ORDER BY contentid DESC", 0, 6, array (  'titlelen' => '16',  'target' => '_blank',  'width' => '120',  'height' => '82',));?>
        </ul>
      </div>
    </div>
<?php } ?>
    <!--图文混排一-->
    <!--end 栏目列表-->
  </div>
  <!--end left-->
  <!--begin right-->
  <div id="main_r">
     <div class="ad_side">
      <script language="javascript" src="data/js.php?id=5"></script>
    </div>
    <h4>最新图片</h4>
    <div>
      <ul class="pic_list">
       <?php echo tag('phpcms', 'tag_content_cat_pic', "SELECT contentid,catid,typeid,areaid,title,style,thumb,keywords,description,userid,updatetime,inputtime,url FROM `phpcms_content` WHERE  status=99   AND  `thumb`!=''  ORDER BY contentid DESC", 0, 9, array (  'class' => 'url',  'target' => '_blank',  'titlelen' => '12',  'height' => '62',  'width' => '87',));?>
      </ul>
    </div>
    <h4>今日图片DIGG排行</h4>
    <div>
      <ul class="digg_text_list">
<?php $cats = get_sql_catid($catid);?>
        <?php $DATA = get("select d.contentid,d.supports,c.title,c.style,c.url from phpcms_digg d left join phpcms_content c on d.contentid=c.contentid where c.status=99 $cats order by d.supports_week desc", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><span><?php echo $r['supports'];?></span><a href="<?php echo $r['url'];?>" target="_blank" class="<?php echo $r['style'];?>"><?php echo str_cut($r[title], 44);?></a></li>
<?php } unset($DATA); ?>
      </ul>
    </div>
<div>
      <ul class="pic_list">
      <?php echo block('picture', 1);?>
      </ul>
    </div>

  </div>
  <!--end right-->
</div>
<!--end main-->
<?php include template('phpcms','footer'); ?>